package com.ltmt.es.utils.htmlparser;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;

import com.ltmt.es.pojo.PrimitivaCombination;
import com.ltmt.es.pojo.PrimitivaDraw;

public class PrimitivaHTMLParser {

	public String getHtml (String urlStr){
		String contenido = "";
		try{
			URL url = new URL(urlStr);
		    URLConnection uc = url.openConnection();
		    uc.connect();
		    //Creamos el objeto con el que vamos a leer
		    BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
		    String inputLine;
		    
		    while ((inputLine = in.readLine()) != null) {
		        contenido += inputLine + "\n";
		    }
		    in.close();
		    
		} catch (IOException ioex){
			
		}
		return contenido;
	}
	
	public PrimitivaCombination getCombinationForDraw (PrimitivaDraw draw){
		return null;
	}
	
	public List<PrimitivaDraw> getListOfDraws (){
		return null;
	}
	
	
	
}
